﻿#include "FITKPHengLEIDiscretisation.h"
#include "FITK_Kernel/FITKEasyParam/FITKParameter.h"
#include "FITK_Kernel/FITKCore/FITKAbstractNDataObject.h"
#include "FITKPHengLEIAbsSpatialDiscretisation.h"

namespace Interface
{
	FITKPHengLEIDiscretisation::FITKPHengLEIDiscretisation()
	{
		_additionalTemporal = new Core::FITKParameter;
	}

	FITKPHengLEIDiscretisation::~FITKPHengLEIDiscretisation()
	{
		if (_additionalTemporal) delete _additionalTemporal;
		if (_spatialDiscretisation) delete _spatialDiscretisation;
	}

	Core::FITKParameter * FITKPHengLEIDiscretisation::getTemporalAdditionalData()
	{
		return _additionalTemporal;
	}

	FITKPHengLEIAbsSpatialDiscretisation * FITKPHengLEIDiscretisation::getSpatialDiscretisation()
	{
		return _spatialDiscretisation;
	}

	void FITKPHengLEIDiscretisation::setSpatialDiscretisation(FITKPHengLEIAbsSpatialDiscretisation * spatialDiscretisation)
	{
		if (_spatialDiscretisation != spatialDiscretisation && _spatialDiscretisation) delete _spatialDiscretisation;
		_spatialDiscretisation = spatialDiscretisation;
	}
}
